<?php
namespace app\admin\validate;
use think\Validate;
use think\Db;
class StoreBeautician extends Validate
{

    // 验证规则
    protected $rule = [
        'beautician_id'              =>'checkBeauticianId',
        'name'            => 'require|min:1|max:150|unique:beautician',
        'exp'			  => 'number'
    ];
    //错误信息
    protected $message  = [
        'name.require'                            => '请填写美体师名称必填',
        'name.min'                                => '美体师名称长度至少1个字符',
        'name.max'                                => '美体师名称长度至多50个汉字',
        'name.unique'                             => '美体师名称重复',
        'exp.number'							  => '年限是数字'
    ];


    
    protected function checkBeauticianId($value){
        return true;
    }

}